public class AnimalRule {
    private String condition;
    private String conclusion;

    public AnimalRule(String condition, String conclusion) {
        this.condition = condition;
        this.conclusion = conclusion;
    }

    public boolean checkCondition(Animal animal) {
        // 检查动物是否符合规则的条件
        for (String feature : condition.split(",")) {
            if (!animal.hasFeature(feature.trim())) {
                return false;
            }
        }
        return true;
    }

    public String getConclusion() {
        return conclusion;
    }
}
